package cn.psvmc.cxzapi.model.order;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 订单申请记录表
 * @Author auto
 * @Date 2024-12-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_order_record")
public class TOrderRecord implements Serializable {

    //订单申请记录id
    @TableId(value = "orid", type = IdType.AUTO)
    private Integer orid;

    //订单号
    @TableField("order_code")
    private String orderCode;

    //类型（1申请续租 2申请退款 3修改账单金额 4修改账单支付状态 5更换账单期数 6冻结押金转支付）
    @TableField("rtype")
    private Integer rtype;

    //申请状态（0待处理1已同意2已拒绝）
    @TableField(value = "status", fill = FieldFill.INSERT)
    private Integer status;

    //申请续租结束日期
    @TableField("end_time")
    private String endTime;

    //金额
    @TableField("amount")
    private Double amount;

    //输入金额
    @TableField("in_amount")
    private Double inAmount;

    //申请更换前的期数
    @TableField("period")
    private Integer period;

    //申请更换后的期数
    @TableField("new_period")
    private Integer newPeriod;

    //账单状态（0待支付1已支付）
    @TableField("bill_status")
    private Integer billStatus;

    //备注
    @TableField("comm")
    private String comm;

    //审核状态（0待处理1审核通过2拒绝）
    @TableField("check_status")
    private Integer checkStatus;

    //审核意见
    @TableField("check_comm")
    private String checkComm;

    //审核人id
    @TableField(value = "check_id")
    private Integer checkId;

    //审核时间
    @TableField(value = "check_time")
    private LocalDateTime checkTime;

    //商家id
    @TableField("storeid")
    private Integer storeid;

    //附件
    @TableField("file_path")
    private String filePath;

    //账单ids
    @TableField("obids")
    private String obids;

    //账单id
    @TableField("obid")
    private Integer obid;

    //创建人id
    @TableField(value = "createid", fill = FieldFill.INSERT)
    private Integer createid;

    //创建时间
    @TableField(value = "createtime", fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    //退款总金额
    @TableField(exist = false)
    private Double totalAmount;


}
